/*
 *  Copyright 2020-2025 the original author or authors.
 *  You cannot use this file unless authorized by the author.
 */

package org.ipig.computing.constant;

import java.util.Arrays;
import java.util.List;

/**
 * 请在此处添加注释
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @since 1.0
 */
public class SpikeCnst {
    public static final String BIZ = "biz";
    public static final String DIM = "dim";
    public static final String KEY = "key";
    public static final String DUR = "dur";
    public static final String ID = "id";
    public static final String VALUE = "value";
    public static List<String> BIN_RESERVED_KEYS = Arrays.asList(new String[]{BIZ,DIM,KEY,DUR});

    /**
     * Namespace
     */
    public enum Namespace {
        /**
         * 统计数据
         */
        STAT("stat", "统计数据"),
        /**
         * 原始数据
         */
        ORIG("orig", "原始数据");
        //code
        public final String code;
        //title
        public final String title;

        /**
         * @param code  String
         * @param title String
         */
        Namespace(String code, String title) {
            this.code = code;
            this.title = title;
        }
    }

    /**
     * set
     */
    public enum Set {
        /**存储kafka的offset*/
        KAFKA_OFFSET("kafka_offset", "存储kafka的offset"),
        /**存储缓存*/
        STORE_CACHE("store_cache", "存储缓存"),
        /**存储统计结果*/
        STORE_STAT("store_stat", "存储统计结果"),
        /**id幂等性校验*/
        ID_IDEMPOTENT("id_idempotent", "id幂等性校验");
        //code
        public final String code;
        //title
        public final String title;

        /**
         * @param code  String
         * @param title String
         */
        Set(String code, String title) {
            this.code = code;
            this.title = title;
        }
    }
}
